Skip to content

fix(apm): Add trace context to all events - #2486

Merged
HazAT merged 3 commits into
masterfrom
ref/apm-trace-context
Mar 11, 2020
Merged

fix(apm): Add trace context to all events#2486
HazAT merged 3 commits into
masterfrom
ref/apm-trace-context

Conversation

@HazAT

@HazAT HazAT commented Mar 10, 2020

Copy link
Copy Markdown
Member

Partially fixes this PR #2353
We want that also error event to have the trace context if available.

@HazAT
HazAT requested a review from kamilogorek as a code owner March 10, 2020 19:22
@HazAT HazAT self-assigned this Mar 10, 2020
@dashed

dashed commented Mar 10, 2020

Copy link
Copy Markdown
Member

/cc @evanh @getsentry/visibility

Comment thread packages/hub/src/scope.ts
Comment on lines +335 to +337
if (this._span) {
event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only relevant code for this PR

@dashed dashed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :D

@HazAT HazAT changed the title fix: Add trace context to all events fix(apm): Add trace context to all events Mar 11, 2020
@HazAT
HazAT merged commit 57fe8c6 into master Mar 11, 2020
@HazAT
HazAT deleted the ref/apm-trace-context branch March 11, 2020 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants